package cz.muni.fi.pv112.cranesimulator.models.crane.parts;

import cz.muni.fi.pv112.cranesimulator.models.OBJModel;

/**
 *
 * @author Michal Ďuriš
 */
public class OperatingPart extends OBJModel {

    private float rotaryAngle = 0.0f;
    private float rotaryAngleStep = 1.0f;

    public OperatingPart() {
        super();

        path = "/cz/muni/fi/pv112/cranesimulator/resources/models/crane/parts/operating part.obj";
    }

    public float getRotaryAngle() {
        return rotaryAngle;
    }

    public void setRotaryAngle(float rotaryAngle) {
        this.rotaryAngle = rotaryAngle;
    }

    public float getRotaryAngleStep() {
        return rotaryAngleStep;
    }

    public void setRotaryAngleStep(float rotaryAngleStep) {
        this.rotaryAngleStep = rotaryAngleStep;
    }

    public void increaseRotaryAngle() {
        rotaryAngle = (rotaryAngle + rotaryAngleStep) % 360f;
    }

    public void decreaseRotaryAngle() {
        rotaryAngle = (rotaryAngle - rotaryAngleStep) % 360f;
    }

}
